package me.hellp.helloworld.design.observer;

/**
 * 自定义的观察者
 * 
 * @author linxm
 *
 */
public class NormalUser implements Observer{
	//	用户名
	private String userName;
	
	//	获得的消息
	private String message;
	
	public NormalUser(String userName){
		this.userName = userName;
	}
	
	@Override
	public void update(String message) {
		this.message = message;
		read();
	}

    public void read() {
        System.out.println(userName + " 收到推送消息： " + message);
    }
}
